package timeDemo.beeboxesRule;

/**
 * @author Ajie
 * @date 2022/11/14
 * @function
 */
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//


import timeDemo.beeboxesRule.Range.*;

import java.util.List;
import java.util.Set;

public class TimeRule {
    private String title;
    private TimeRule.Type type;
    private Range<Day> dayRange;
    private List<Day> excludes;
    private TimeRule.DayType dayType;
    private Set<Integer> customDays;
    private Range<Time> timeRange;
    private Action action;

    public TimeRule() {
    }

    public String getTitle() {
        return this.title;
    }

    public TimeRule.Type getType() {
        return this.type;
    }

    public Range<Range.Day> getDayRange() {
        return this.dayRange;
    }

    public List<Day> getExcludes() {
        return this.excludes;
    }

    public TimeRule.DayType getDayType() {
        return this.dayType;
    }

    public Set<Integer> getCustomDays() {
        return this.customDays;
    }

    public Range<Time> getTimeRange() {
        return this.timeRange;
    }

    public Action getAction() {
        return this.action;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setType(TimeRule.Type type) {
        this.type = type;
    }

    public void setDayRange(Range<Day> dayRange) {
        this.dayRange = dayRange;
    }

    public void setExcludes(List<Day> excludes) {
        this.excludes = excludes;
    }

    public void setDayType(TimeRule.DayType dayType) {
        this.dayType = dayType;
    }

    public void setCustomDays(Set<Integer> customDays) {
        this.customDays = customDays;
    }

    public void setTimeRange(Range<Time> timeRange) {
        this.timeRange = timeRange;
    }

    public void setAction(Action action) {
        this.action = action;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof TimeRule)) {
            return false;
        } else {
            TimeRule other = (TimeRule)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label107: {
                    Object this$title = this.getTitle();
                    Object other$title = other.getTitle();
                    if (this$title == null) {
                        if (other$title == null) {
                            break label107;
                        }
                    } else if (this$title.equals(other$title)) {
                        break label107;
                    }

                    return false;
                }

                Object this$type = this.getType();
                Object other$type = other.getType();
                if (this$type == null) {
                    if (other$type != null) {
                        return false;
                    }
                } else if (!this$type.equals(other$type)) {
                    return false;
                }

                Object this$dayRange = this.getDayRange();
                Object other$dayRange = other.getDayRange();
                if (this$dayRange == null) {
                    if (other$dayRange != null) {
                        return false;
                    }
                } else if (!this$dayRange.equals(other$dayRange)) {
                    return false;
                }

                label86: {
                    Object this$excludes = this.getExcludes();
                    Object other$excludes = other.getExcludes();
                    if (this$excludes == null) {
                        if (other$excludes == null) {
                            break label86;
                        }
                    } else if (this$excludes.equals(other$excludes)) {
                        break label86;
                    }

                    return false;
                }

                label79: {
                    Object this$dayType = this.getDayType();
                    Object other$dayType = other.getDayType();
                    if (this$dayType == null) {
                        if (other$dayType == null) {
                            break label79;
                        }
                    } else if (this$dayType.equals(other$dayType)) {
                        break label79;
                    }

                    return false;
                }

                label72: {
                    Object this$customDays = this.getCustomDays();
                    Object other$customDays = other.getCustomDays();
                    if (this$customDays == null) {
                        if (other$customDays == null) {
                            break label72;
                        }
                    } else if (this$customDays.equals(other$customDays)) {
                        break label72;
                    }

                    return false;
                }

                Object this$timeRange = this.getTimeRange();
                Object other$timeRange = other.getTimeRange();
                if (this$timeRange == null) {
                    if (other$timeRange != null) {
                        return false;
                    }
                } else if (!this$timeRange.equals(other$timeRange)) {
                    return false;
                }

                Object this$action = this.getAction();
                Object other$action = other.getAction();
                if (this$action == null) {
                    if (other$action != null) {
                        return false;
                    }
                } else if (!this$action.equals(other$action)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof TimeRule;
    }

    public int hashCode() {
        int result = 1;
        Object $title = this.getTitle();
        result = result * 59 + ($title == null ? 43 : $title.hashCode());
        Object $type = this.getType();
        result = result * 59 + ($type == null ? 43 : $type.hashCode());
        Object $dayRange = this.getDayRange();
        result = result * 59 + ($dayRange == null ? 43 : $dayRange.hashCode());
        Object $excludes = this.getExcludes();
        result = result * 59 + ($excludes == null ? 43 : $excludes.hashCode());
        Object $dayType = this.getDayType();
        result = result * 59 + ($dayType == null ? 43 : $dayType.hashCode());
        Object $customDays = this.getCustomDays();
        result = result * 59 + ($customDays == null ? 43 : $customDays.hashCode());
        Object $timeRange = this.getTimeRange();
        result = result * 59 + ($timeRange == null ? 43 : $timeRange.hashCode());
        Object $action = this.getAction();
        result = result * 59 + ($action == null ? 43 : $action.hashCode());
        return result;
    }

    public String toString() {
        return "TimeRule(title=" + this.getTitle() + ", type=" + this.getType() + ", dayRange=" + this.getDayRange() + ", excludes=" + this.getExcludes() + ", dayType=" + this.getDayType() + ", customDays=" + this.getCustomDays() + ", timeRange=" + this.getTimeRange() + ", action=" + this.getAction() + ")";
    }

    public static enum Type {
        CYCLE,
        TIMING;

        private Type() {
        }
    }

    public static enum DayType {
        EVERYDAY,
        WEEKDAY,
        CUSTOM;

        private DayType() {
        }
    }
}
